package com.app.miwawa.api.system.service.dao;

import org.framework.common.api.service.repository.CommonRepositoryAware;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import com.app.miwawa.api.system.entity.center.Users;

/**
 * 数据接口
 * <p>描述: 雇员－数据接口</p>
 * <p>Company: Professional</p>
 * @author chanlong(陈龙)
 * @date 2016年1月23日 上午9:39:49
 * @version 1.0.2016
 */
public interface UsersDao extends CommonRepositoryAware<Users, String> {
	
	@Modifying
	@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
	@Query("update Users o set o.password = :password where o.id = :id")
	public void password(@Param("password") final String password, @Param("id") final String id);
}
